<?php
declare (strict_types = 1);

namespace app\backend_api\model;

/**
 * @mixin \think\Model
 */
class AdminRoles extends BaseModel
{
    public function menus()
    {
        return $this->belongsToMany(AdminMenus::class, 'admin_role_with_menus', 'menu_id', 'role_id')
            ->where(['status' => 1])
            ->order('menu_sort', 'ASC');
    }
}
